﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="addjobcategory.aspx.cs" Inherits="Admin_addjobcategory" MasterPageFile="~/Admin/AdminMasterLogin.master"%>

<asp:Content ContentPlaceHolderID="head" runat="server">

<script language="javascript" type="text/javascript">

function ConfirmDelete()
 {
  return confirm("Are You Sure To delete this Category");
  
}

</script>


</asp:Content>


<asp:Content ContentPlaceHolderID="mainpanel" runat="server">

<table style="width:100%;">
<tr>
<td>
</td>
</tr>
       
        <tr>
            <td colspan="3" style="color:#380000 ; background-color:#E53333;">
                <b> ADD JOB CATEGORY .....</b></td>
        </tr>
        <tr>
        </tr>
        <tr>            
            <td>
                <table style="width:100%; background-color: #FFFFFF;" border="0">
                    <tr>
                        <td id="lblmsg" align="center" runat="server" visible="false" class="style1" colspan="3" style="color:Red;">
                           <span id="lbl" runat="server"> <b>Job Category Saved Successfully... </b></span></td>
                    </tr>
                    <tr>
                        <td class="style1">
                            &nbsp;</td>
                        <td class="style2">
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr >
                        <td align="right" valign="top">
                           Category Name  </td>
                        <td class="style2" valign="top">
                            :</td>
                        <td align="left">
                            <asp:TextBox ID="txtJobType" runat="server" Width="212px"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                ControlToValidate="txtJobType" ErrorMessage="Please enter a Job category"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1" align="right" valign="top">
                             Remark</td>
                        <td class="style2" valign="top">
                           :</td>
                        <td align="left">
                            <asp:TextBox ID="txtremark" runat="server" TextMode="MultiLine" Width="212px"></asp:TextBox> </td>
                    </tr>
                    <tr>
                        <td class="style1">
                             &nbsp;</td>
                        <td class="style2">
                            &nbsp;</td>
                        <td align="left">
                            <asp:Button ID="btnSave" runat="server" Text="Save" onclick="btnSave_Click" 
                                Width="42px" />
                            <asp:Button ID="BtnRefresh" runat="server" onclick="BtnRefresh_Click" 
                                Text="Refresh" />
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                             </td>
                        <td class="style2">
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td class="style1" colspan="3">
                             <asp:GridView ID="DGridcategory" runat="server" AutoGenerateColumns="False" DataKeyNames="CategoryID" 
                                 CellPadding="4" ForeColor="#333333" GridLines="None" Width="100%" 
                                 
                                 onrowdeleting="DGridcategory_RowDeleting" 
                                 onrowediting="DGridcategory_RowEditing" 
                                 onrowcancelingedit="DGridcategory_RowCancelingEdit" 
                                 onrowupdating="DGridcategory_RowUpdating" 
                                 onselectedindexchanged="DGridcategory_SelectedIndexChanged" 
                                 onselectedindexchanging="DGridcategory_SelectedIndexChanging">
                                 <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                 <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                 <Columns>
                                     <asp:BoundField DataField="CategoryId" Visible="False" />
                                     <asp:TemplateField HeaderText="Job Category Name">
                                         <EditItemTemplate>
                                             <asp:TextBox ID="txtCat" runat="server" Text='<%# Bind("CategoryName") %>'></asp:TextBox>
                                         </EditItemTemplate>
                                         <ItemTemplate>
                                             <asp:Label ID="Label1" runat="server" Text='<%# Bind("CategoryName") %>'></asp:Label>
                                         </ItemTemplate>
                                         <HeaderStyle HorizontalAlign="Left" />
                                         <ItemStyle HorizontalAlign="Left" />
                                     </asp:TemplateField>
                                     <asp:TemplateField HeaderText="Remarks">
                                         <EditItemTemplate>
                                             <asp:TextBox ID="txtRemark" runat="server" Text='<%# Bind("CategoryRemarks") %>'></asp:TextBox>
                                         </EditItemTemplate>
                                         <ItemTemplate>
                                             <asp:Label ID="Label2" runat="server" Text='<%# Bind("CategoryRemarks") %>'></asp:Label>
                                         </ItemTemplate>
                                         <HeaderStyle HorizontalAlign="Left" />
                                         <ItemStyle HorizontalAlign="Left" />
                                     </asp:TemplateField>
                                     <asp:CommandField ShowEditButton="True"  CausesValidation="false"/>
                                     <asp:TemplateField ShowHeader="False">
                                         <ItemTemplate>
                                             <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                                                 CommandName="Delete" Text="Delete" OnClientClick="return ConfirmDelete();"></asp:LinkButton>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                     <asp:TemplateField ShowHeader="False">
                                         <ItemTemplate>
                                             <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 
                                                 CommandName="Select" Text="Assign Sub Cat"></asp:LinkButton>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                 </Columns>
                                 <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                 <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                 <HeaderStyle BackColor="#E53333" Font-Bold="True" ForeColor="#500000 " />
                                 <EditRowStyle BackColor="#999999" />
                                 <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                             </asp:GridView>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                             &nbsp;</td>
                        <td class="style2">
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                    </tr>
                </table>
            </td>
            
        </tr>
        <tr>
            <td colspan="3">
                <hr /></td>
        </tr>
    </table>


</asp:Content>

